# -*-coding:utf-8-*-
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By

EIP_username = "00000"
EIP_password = "Hornit2016"
EIP_url = "http://192.168.110.205:8087/"
dr = webdriver.Chrome()
dr.maximize_window()
dr.get(EIP_url)
username = WebDriverWait(dr, 30).until(lambda driver: dr.find_element_by_id("txtUserName"))
pwd = WebDriverWait(dr, 30).until(lambda driver: dr.find_element_by_id("txtPassword"))
username.send_keys(EIP_username)
pwd.send_keys(EIP_password)
WebDriverWait(dr, 30).until(EC.element_to_be_clickable((By.ID, "btnLogin"))).click()